package com.coolbi.onsupai.core.dao.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;

import com.coolbi.onsupai.core.dao.FranchiserFundDeclareDao;
import com.coolbi.onsupai.core.entity.FranchiserFundDeclare;
import com.coolbi.onsupai.core.mapper.FranchiserFundDeclareMapper;

public class FranchiserFundDeclareDaoImpl implements FranchiserFundDeclareDao {
	@Autowired
	private FranchiserFundDeclareMapper FranchiserFundDeclareMapper;
	public void setFranchiserFundDeclareMapper(
			FranchiserFundDeclareMapper franchiserFundDeclareMapper) {
		this.FranchiserFundDeclareMapper = franchiserFundDeclareMapper;
	}

	@Override
	public FranchiserFundDeclare save(FranchiserFundDeclare obj) {
		FranchiserFundDeclareMapper.save(obj);
		return obj;
	}

	@Override
	public int delete(long id) {
		return FranchiserFundDeclareMapper.delete(id);
	}

	@Override
	public int update(FranchiserFundDeclare obj) {
		return FranchiserFundDeclareMapper.update(obj);
	}

	@Override
	public FranchiserFundDeclare get(long id) {
		return FranchiserFundDeclareMapper.get(id);
	}

	@Override
	public List<FranchiserFundDeclare> list() {
		return FranchiserFundDeclareMapper.list();
	}

	@Override
	public List<FranchiserFundDeclare> listByPage(int offset, int limit) {
		Map<String,Object>parameter=new HashMap<String,Object>();
		parameter.put("offset", offset);
		parameter.put("limit",limit);
		return FranchiserFundDeclareMapper.listByPage(parameter);
	}

	@Override
	public List<FranchiserFundDeclare> find(Map<String, Object> parameter) {
		return FranchiserFundDeclareMapper.listByParameter(parameter);
	}

	@Override
	public List<FranchiserFundDeclare> findByPage(Map<String, Object> parameter,
			int offset, int limit) {
		parameter.put("offset", offset);
		parameter.put("limit", limit);
		return FranchiserFundDeclareMapper.listByParameter(parameter);
	}

	@Override
	public List<FranchiserFundDeclare> search(Map<String, Object> parameter,
			int offset, int limit) {
		parameter.put("offset", offset);
		parameter.put("limit", limit);
		return FranchiserFundDeclareMapper.search(parameter);
	}

	@Override
	public int count() {
		return FranchiserFundDeclareMapper.count();
	}

	@Override
	public int countByKeyWord(Map<String, Object> parameter) {
		return FranchiserFundDeclareMapper.countByKeyWord(parameter);
	}

	@Override
	public int count(Map<String, Object> parameter) {
		return FranchiserFundDeclareMapper.countByParameter(parameter);
	}

}
